export default function deepClone (target) {
    if (typeof target !== 'object')  return target
    let res = Array.isArray(target) ? [] : {}
    for (const key in target) {
        if (target[key] && target.hasOwnProperty(key)) {
            if (typeof target[key] === 'object') {
                res[key] = Array.isArray(target[key]) ? [] : {}
                res[key] = deepClone(target[key])
            } else {
                res[key] = target[key]
            }
        }
    }
    return res
}